from typing import List, Optional
from django.db.models import QuerySet, Count, Q
from apps.core.repositories import BaseRepository
from ..models import DemoUser

class DemoUserRepository(BaseRepository[DemoUser]):
    def __init__(self):
        super().__init__(DemoUser)

    # 根据姓名获取数据
    def get_by_name(self, name: str) -> List[DemoUser]:
        data = self.model_class.objects.filter(Name=name)
        return list(data)